import org.junit.Test;

import javax.swing.plaf.PanelUI;

import static org.junit.Assert.assertEquals;

public class TriangleTest {

    @Test
    public void testScaleneTriangle() {
        // 测试不等边三角形
        assertEquals("Scalene", TriangleClassifier1.classifyTriangle(3, 4, 5));
    }

    @Test
    public void testEquilateralTriangle() {
        // 测试等边三角形
        assertEquals("Equilateral", TriangleClassifier1.classifyTriangle(3, 3, 3));
    }

    @Test
    public void testIsoscelesTriangle() {
        // 测试等腰三角形
        assertEquals("Isosceles", TriangleClassifier1.classifyTriangle(5, 5, 8));
    }

   @Test
   public void testIsoscelesTriangle2(){
        // 测试等腰三角形三边排列组合
       assertEquals("Isosceles", TriangleClassifier1.classifyTriangle(3,3,4));
       assertEquals("Isosceles", TriangleClassifier1.classifyTriangle(3,4,3));
       assertEquals("Isosceles", TriangleClassifier1.classifyTriangle(4,3,3));
   }
    @Test
    public void testTriangleZeroValue(){
        // 测试边为0
        assertEquals("Not a valid triangle", TriangleClassifier1.classifyTriangle(1,1,0));

    }
    @Test
    public void testTriangleNegativeValue(){
        // 测试边为负数
        assertEquals("Not a valid triangle", TriangleClassifier1.classifyTriangle(1,1,-1));

    }
    @Test
    public void testTriangleThirdValueEqual(){
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(1,2,3));

    }
    @Test
    public void testTriangleThirdValueEqual2(){
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(1,2,3));
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(1,3,2));
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(3,1,2));

    }
    @Test
    public void testTriangleThirdValueLess()
    {
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(1,2,4));
    }
    @Test
    public void testTriangleThirdValueLess2()
    {
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(1,2,4));
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(1,4,2));
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(4,2,1));
    }
    @Test
    public void testTriangleAllZero()
    {
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(0,0,0));
    }
    @Test
    public void testTriangleNonInteger()
    {
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(2.5,3.5,5.5));
    }
    @Test
    public void testTriangleTwoInteger()
    {
        assertEquals("Not a valid triangle",TriangleClassifier1.classifyTriangle(2,3,5.5));
    }

    @Test
    public void testInvalidTriangle() {
        // 测试无效的三角形
        assertEquals("Not a valid triangle", TriangleClassifier1.classifyTriangle(1, 1, 3));
    }

}
